﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RoadTeam.Enums;
using System.Reflection;
using System.Data;

namespace RoadTeam.SysInterface
{

    public static partial class FactoryClass
    {
        private static RoadTeam.SysInterface.ICsMaintenance _iCsMaintenance = null;
        /// <summary>
        /// 获取ICsAppeal实现业务的实例
        /// </summary>
        /// <returns></returns>
        public static ICsMaintenance CreateCsMaintenance()
        {
            if (_iCsMaintenance == null)
            {
                string className = GlobalConfig.RtSystemPath + ".CS.Maintenance.CsMaintenance_Sys";
                _iCsMaintenance = (ICsMaintenance)Assembly.Load(GlobalConfig.RtSystemPath).CreateInstance(className);
            }
            return _iCsMaintenance;
        }
    }

    public interface ICsMaintenance
    {
        /// <summary>
        /// 插入维修单
        /// </summary>
        /// <param name="dt">维修单数据集合</param>
        /// <returns>是否插入成功</returns>
        bool InsertCsMaintenance(DataTable dt);

        /// <summary>
        /// 获取空维修单列表
        /// </summary>
        /// <returns></returns>
        DataTable GetEmptyTable();
        DataTable GetMaintenanceByIdentities(String Identities);
        String GetSingleMaintenanceByIdentities(String Identities);
    }
}
